﻿using System;


namespace advadev.CanOpen
{

    /// <summary>
    /// Must be implemented from each service
    /// </summary>
    public interface IService
    {

        /// <summary>
        /// When implemented, occures when a transfer is required
        /// </summary>
        event ServiceTransferRequiredEventHandler TransferRequired;

        /// <summary>
        /// When implemented, gets the service state
        /// </summary>
        ServiceState State
        {
            get;
        }

        /// <summary>
        /// When implemented, starts the (stopped) service
        /// </summary>
        void Start();

        /// <summary>
        /// When implemented, pauses the (started) service
        /// </summary>
        void Pause();

        /// <summary>
        /// When implemented, resumes the (paused) service
        /// </summary>
        void Resume();

        /// <summary>
        /// When implemented, stops the (started or paused) service
        /// </summary>
        void Stop();

    }

}
